package com.copd.service;

import com.copd.entity.Role;

import java.util.List;

public interface RoleService {
    
    List<Role> getAllRoles();
    
    Role getRoleById(Integer roleId);
    
    Role getRoleByKey(String roleKey);
    
    Role createRole(Role role);
    
    Role updateRole(Role role);
    
    boolean deleteRole(Integer roleId);
    
    List<Role> getRolesByUserId(Integer userId);
    
    boolean assignPermissionToRole(Integer roleId, Integer permissionId);
    
    boolean removePermissionFromRole(Integer roleId, Integer permissionId);
    
    boolean assignRoleToUser(Integer userId, Integer roleId);
    
    boolean removeRoleFromUser(Integer userId, Integer roleId);
    
    Role getRoleWithPermissions(Integer roleId);
    
    boolean updateRolePermissions(Integer roleId, List<Integer> permissionIds);
} 